using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Threading;
using System.Web.Services;
using System.Web.Services.Description;
using System.Web.Services.Protocols;
namespace cn.com.webxml.webservice
{
	[GeneratedCode("System.Web.Services", "4.0.30319.1"), DesignerCategory("code"), DebuggerStepThrough, WebServiceBinding(Name = "IpAddressSearchWebServiceSoap", Namespace = "http://WebXml.com.cn/")]
	public class IpAddressSearchWebService : SoapHttpClientProtocol
	{
		private SendOrPostCallback getCountryCityByIpOperationCompleted;
		private SendOrPostCallback getGeoIPContextOperationCompleted;
		private SendOrPostCallback getVersionTimeOperationCompleted;
		public event getCountryCityByIpCompletedEventHandler getCountryCityByIpCompleted;
		public event getGeoIPContextCompletedEventHandler getGeoIPContextCompleted;
		public event getVersionTimeCompletedEventHandler getVersionTimeCompleted;
		public IpAddressSearchWebService()
		{
			string text = ConfigurationManager.AppSettings["cn.com.webxml.webservice.IpAddressSearchWebService"];
			if (text != null)
			{
				base.Url = text;
			}
			else
			{
				base.Url = "http://webservice.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx";
			}
		}
		[SoapDocumentMethod("http://WebXml.com.cn/getCountryCityByIp", RequestNamespace = "http://WebXml.com.cn/", ResponseNamespace = "http://WebXml.com.cn/", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
		public string[] getCountryCityByIp(string theIpAddress)
		{
			object[] array = base.Invoke("getCountryCityByIp", new object[]
			{
				theIpAddress
			});
			return (string[])array[0];
		}
		public IAsyncResult BegingetCountryCityByIp(string theIpAddress, AsyncCallback callback, object asyncState)
		{
			return base.BeginInvoke("getCountryCityByIp", new object[]
			{
				theIpAddress
			}, callback, asyncState);
		}
		public string[] EndgetCountryCityByIp(IAsyncResult asyncResult)
		{
			object[] array = base.EndInvoke(asyncResult);
			return (string[])array[0];
		}
		public void getCountryCityByIpAsync(string theIpAddress)
		{
			this.getCountryCityByIpAsync(theIpAddress, null);
		}
		public void getCountryCityByIpAsync(string theIpAddress, object userState)
		{
			if (this.getCountryCityByIpOperationCompleted == null)
			{
				this.getCountryCityByIpOperationCompleted = new SendOrPostCallback(this.OngetCountryCityByIpOperationCompleted);
			}
			base.InvokeAsync("getCountryCityByIp", new object[]
			{
				theIpAddress
			}, this.getCountryCityByIpOperationCompleted, userState);
		}
		private void OngetCountryCityByIpOperationCompleted(object arg)
		{
			if (this.getCountryCityByIpCompleted != null)
			{
				InvokeCompletedEventArgs invokeCompletedEventArgs = (InvokeCompletedEventArgs)arg;
				this.getCountryCityByIpCompleted(this, new getCountryCityByIpCompletedEventArgs(invokeCompletedEventArgs.Results, invokeCompletedEventArgs.Error, invokeCompletedEventArgs.Cancelled, invokeCompletedEventArgs.UserState));
			}
		}
		[SoapDocumentMethod("http://WebXml.com.cn/getGeoIPContext", RequestNamespace = "http://WebXml.com.cn/", ResponseNamespace = "http://WebXml.com.cn/", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
		public string[] getGeoIPContext()
		{
			object[] array = base.Invoke("getGeoIPContext", new object[0]);
			return (string[])array[0];
		}
		public IAsyncResult BegingetGeoIPContext(AsyncCallback callback, object asyncState)
		{
			return base.BeginInvoke("getGeoIPContext", new object[0], callback, asyncState);
		}
		public string[] EndgetGeoIPContext(IAsyncResult asyncResult)
		{
			object[] array = base.EndInvoke(asyncResult);
			return (string[])array[0];
		}
		public void getGeoIPContextAsync()
		{
			this.getGeoIPContextAsync(null);
		}
		public void getGeoIPContextAsync(object userState)
		{
			if (this.getGeoIPContextOperationCompleted == null)
			{
				this.getGeoIPContextOperationCompleted = new SendOrPostCallback(this.OngetGeoIPContextOperationCompleted);
			}
			base.InvokeAsync("getGeoIPContext", new object[0], this.getGeoIPContextOperationCompleted, userState);
		}
		private void OngetGeoIPContextOperationCompleted(object arg)
		{
			if (this.getGeoIPContextCompleted != null)
			{
				InvokeCompletedEventArgs invokeCompletedEventArgs = (InvokeCompletedEventArgs)arg;
				this.getGeoIPContextCompleted(this, new getGeoIPContextCompletedEventArgs(invokeCompletedEventArgs.Results, invokeCompletedEventArgs.Error, invokeCompletedEventArgs.Cancelled, invokeCompletedEventArgs.UserState));
			}
		}
		[SoapDocumentMethod("http://WebXml.com.cn/getVersionTime", RequestNamespace = "http://WebXml.com.cn/", ResponseNamespace = "http://WebXml.com.cn/", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
		public string getVersionTime()
		{
			object[] array = base.Invoke("getVersionTime", new object[0]);
			return (string)array[0];
		}
		public IAsyncResult BegingetVersionTime(AsyncCallback callback, object asyncState)
		{
			return base.BeginInvoke("getVersionTime", new object[0], callback, asyncState);
		}
		public string EndgetVersionTime(IAsyncResult asyncResult)
		{
			object[] array = base.EndInvoke(asyncResult);
			return (string)array[0];
		}
		public void getVersionTimeAsync()
		{
			this.getVersionTimeAsync(null);
		}
		public void getVersionTimeAsync(object userState)
		{
			if (this.getVersionTimeOperationCompleted == null)
			{
				this.getVersionTimeOperationCompleted = new SendOrPostCallback(this.OngetVersionTimeOperationCompleted);
			}
			base.InvokeAsync("getVersionTime", new object[0], this.getVersionTimeOperationCompleted, userState);
		}
		private void OngetVersionTimeOperationCompleted(object arg)
		{
			if (this.getVersionTimeCompleted != null)
			{
				InvokeCompletedEventArgs invokeCompletedEventArgs = (InvokeCompletedEventArgs)arg;
				this.getVersionTimeCompleted(this, new getVersionTimeCompletedEventArgs(invokeCompletedEventArgs.Results, invokeCompletedEventArgs.Error, invokeCompletedEventArgs.Cancelled, invokeCompletedEventArgs.UserState));
			}
		}
		public new void CancelAsync(object userState)
		{
			base.CancelAsync(userState);
		}
	}
}
